﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel.DataAnnotations;

namespace SimpleTaskManager.Domain.Entities
{
    /// <summary>
    /// Represents an entry where a user specified a number of worked hours
    /// </summary>
    public class WorkingHoursEntry
    {
        /// <summary>
        /// ID
        /// </summary>
        public int WorkingHoursEntryID { get; set; }

        /// <summary>
        /// The ID of the user who added the entry
        /// </summary>
        public int UserID { get; set; }

        /// <summary>
        /// The reference to the user who added the entry
        /// </summary>
        [ForeignKey("UserID")]
        public virtual User User { get; set; }

        /// <summary>
        /// The ID of the task to which the entry belongs
        /// </summary>
        public int TaskID { get; set; }

        /// <summary>
        /// The reference to the task to which the entry belongs
        /// </summary>
        [ForeignKey("TaskID")]
        public virtual Task Task { get; set; }

        /// <summary>
        /// The time when the entry was created
        /// </summary>
        public DateTime Date { get; set; }

        /// <summary>
        /// The number of hours worked by the user
        /// </summary>
        public int Hours { get; set; }
    }
}
